package com.zenchn.service.impl;

import com.zenchn.dao.TMiRegionDetailMapper;
import com.zenchn.dynamic.TMiRegionDetailDynamicMapper;
import com.zenchn.generic.GenericDao;
import com.zenchn.generic.GenericServiceImpl;
import com.zenchn.model.TMiRegionDetail;
import com.zenchn.model.TMiRegionDetailExample;
import com.zenchn.service.RegionDetailService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * 区域详情信息Service实现类
 *
 * @author dingxinfa
 * @date 2020-04-16
 */
@Service
@Transactional(rollbackFor = Exception.class)
public class RegionDetailServiceImpl extends GenericServiceImpl<TMiRegionDetail, String, TMiRegionDetailExample> implements RegionDetailService {

    @Resource
    private TMiRegionDetailMapper regionDetailMapper;

    @Resource
    private TMiRegionDetailDynamicMapper regionDetailDynamicMapper;

    @Override
    public GenericDao<TMiRegionDetail, String, TMiRegionDetailExample> getDao() {
        return regionDetailMapper;
    }

    @Override
    public List<String> getAreaNames(String regionId) {
        return regionDetailMapper.getAreaNames(regionId);
    }
}
